package com.micro.app.client;


import com.micro.app.config.FeignCallBackFactoryConfig;
import com.micro.app.config.MyFeignRequestInterceptor;
import com.micro.common.constant.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author pan.shun
 * @version 2.0
 * @since 2022/7/13 20:13
 */
@Component
@FeignClient(
        name = "micro-center",
        path = "micro-center",
        configuration = MyFeignRequestInterceptor.class,
        fallbackFactory = FeignCallBackFactoryConfig.class
)
public interface FeignClientService {

    /**
     * 应用使用feign 调用认证中心的
     */
    @GetMapping("/dict/getDictByCode")
    R getDictByCode(
            @RequestParam("dictCode") String dictCode,
            @RequestParam("appId") String appId);

}
